<html lang="zh-CN"><head>
<title>购物车</title>
<meta charset="UTF-8">
<meta name="viewport" content=" initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
    <script type="text/javascript" src="wx_assets/js/alertMsg.js"></script>
<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/share_product.js?2014-01-05"></script>
<link href="{$Think.config.RESOURCEURL}wx_assets/css/product_list.css" rel="stylesheet">
<link href="{$Think.config.RESOURCEURL}wx_assets/css/product_templates.css" rel="stylesheet">
</head>
<body>
<notempty name="headerTpl">
	<include file="$headerTpl" />
</notempty>

<div class="lay_page current">
    <div class="lay_page_wrap">
    	<input type="hidden" id="items-len" value="{$total}">
        <input type="hidden" id="problem-Len" value="0">
        <section id="content">  
        	<notempty name="productList">
            <section id="item-sec">
            	<volist name="productList" id="product">
                <div class="mod_cell ui_plr0 ui_mt15 qb_mb15 item" id="{$i}" last-count="1" price="">
                    <div class="mod_celltitle qb_fs_s ui_plr10">
                        <h3 class="qb_fl">
                        <notempty name="product.discountedPrice">
                        	<i bc="{$product.reserveCount}" price="{$product['discountedPrice'] * 100}" class="qb_icon icon_checkbox icon_checkbox_checked" index="{$i}" name="cart_checkbox"></i>
		    			</notempty>
		    			<empty name="product.discountedPrice">
		    				<i bc="{$product.reserveCount}" price="{$product['fixedPrice'] * 100}" class="qb_icon icon_checkbox icon_checkbox_checked" index="{$i}" name="cart_checkbox"></i>
		   				</empty>
                        </h3>
                    </div>
                    <div class="ui_plr10">
                        <ul class="mod_list mod_list_hr qb_fs_s">
                            <li class="list_item qb_mb10 qb_bfc">
                                <a onClick="onDetail(this,{$product.id})" class="bfc_f">
                                    <img src="{$product.picUrl}">
                                </a>
                                <div class="bfc_c">
                                    <p>{$product.name}</p>
                                    <if condition="($product.discountedPrice neq null) OR ($product.fixedPrice neq null)">
                                    <p>单价：
                                    <notempty name="product.discountedPrice">
                                    	<span class="ui_color_strong">￥{$product.discountedPrice}</span>
                    				</notempty>
                    				<empty name="product.discountedPrice">
                    					<span class="ui_color_strong">￥{$product.fixedPrice}</span>
                   					</empty>
                   					</if>
                   					<notempty name="product.points">
                   						积分：<span class="ui_color_strong"> {$product.points}</span>
                   					</notempty>
                                   </p>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="qb_tar ui_p10 qb_fs_s ui_bg_color_weak ui-bt">
                        <i class="qb_icon icon_trash ui_mr30 icon_delete"></i>
                        数量：<input type="tel" class="ui_textinput ui_textinput_tiny count" value="{$product.reserveCount}">
                        <span class="qb_tof" style="width: 150px">共计：
                        	<notempty name="product.discountedPrice">
                              	<span class="ui_color_strong single-total">￥{$product['discountedPrice'] * $product[reserveCount]}元</span>
              				</notempty>
              				<empty name="product.discountedPrice">
              					<span class="ui_color_strong single-total">￥{$product['fixedPrice'] * $product['reserveCount']}元</span>
             				</empty>
             				<notempty name="product.points">
                   				积分：<span class="ui_color_strong single-total"> {$product.points}</span>
                   			</notempty>
                        </span>
                    </div>
                    <input type="hidden" class="cmdy-data" supportcod="true" num="1" 
                    	limit="0" storenum="50" ic="13788" pid="{$product.id}" sa="戒指手寸:颜色I主钻61.6女14号">
                </div>
            	</volist>
                <div class="mod_cell ui_mt15 qb_mb15 ui_pt10">
                    <div class="ui_pb10 ui_clearfix qb_fs_s">
                        <div class="qb_fl">
                            <span class="ui_mr30 ui_pt10"><i class="qb_icon icon_checkbox icon_checkbox_checked" id="choose-all"></i>全选</span>
                            总价：<span class="ui_color_strong">￥<span id="total"></span></span>
                        </div>
                        <span class="mod_btn btn_strong qb_fr confirm_order">去结算</span>
                    </div>
                </div>
            </section> 
            </notempty>
            <empty name="productList">
            	<div class='qb_gap qb_tac qb_pt10' style='padding:70px 0 5px;margin-bottom: 0px;'>
	            	<img src='wx_assets/images/product/icon_cart_empty.png' width='81' class='qb_mb10'>
	            	<p class='qb_fs_xl mod_color_comment'>你的购物车空空如也哦</p></div> <div class='qb_tac qb_gap'>
	            	<!-- 
	            	<a href='" + window.basePath + "/cn/index.xhtml?" + window.baseParam + "' class='mod_btn'>去逛逛</a>
	            	 -->
            	</div>
            </empty>
            <!-- 
            <form action="/cmd/confirmOrder.html?wechatid=osXr8jvSZhLiLQ3bzQbNTzmX8E7M" method="get" name="cartForm">
                
                 <input type="hidden" value="osXr8jvSZhLiLQ3bzQbNTzmX8E7M" id="wechatid" name="wechatid">
                
                <input type="hidden" value="0" id="payType" name="payType">
                <input type="hidden" value="" id="itemList" name="itemList">
                <input type="hidden" value="1" id="cart" name="cart">
                <input type="hidden" id="trandom" name="t"> 
            </form>
             -->
        </section>
    </div>
</div>
<div class="qb_quick_tip qb_none" id="bubble"></div>
<div class="mod_dialog qb_none" id="message-notice">
    <div class="dialog_mask"></div>
    <div class="dialog_main qb_br qb_tac">
        <div class="dialog_bd" id="notice-content"></div>
        <div class="dialog_ft qb_flex"><a href="javascript:void(0);" class="flex_box" id="notice-cancel">取消</a><a href="javascript:void(0);" class="flex_box" id="notice-sure">确定</a></div>
    </div>
</div>
  
<notempty name="footerTpl">
	<include file="$footerTpl"/>
</notempty>
<script src="wx_assets/js/zepto_product.js?v=201401121"></script> 
<script>
var hrefParamsArray = GetSessionIdFromHref(window.location.search);
hrefParamsArray["userName"]='{$userName}';
function GetSessionIdFromHref(search){
　　	var args = search.substring(1); 
　　	var retval = new Array(); 
	args = args.split("&"); 
		for(var i = 0; i < args.length; i ++){ 
			str = args[i]; 
			var arg = str.split("="); 
			if(arg.length <= 1) continue; 
			
			if(arg[0] == 'params') {
				var params = decodeURIComponent(arg[1]);
				var obj = eval('(' + params + ')');
				if (obj.rootid != undefined) {
					retval["rootid"] = obj.rootid;
				}
			} else if(arg[0] == 'customerId') {
				retval["customerId"] = arg[1];
			}else if(arg[0] == 'userName'){
				retval["userName"] = arg[1]; 
			}
		} 
		return retval; 
}

var hrefPath = 'call.html?customerId='+ hrefParamsArray["customerId"];
var basePath = 'call.json?customerId='+ hrefParamsArray["customerId"]+'&userName='+hrefParamsArray["userName"];
var rootId = hrefParamsArray["rootid"] == undefined ? '' : ',"rootid":' + hrefParamsArray["rootid"];
</script>
<script type="text/javascript">
function onDetail(ctrl,id) {
	ctrl.href = hrefPath + '&module=product&method=getProduct&params={"tplid":4,"id":"' + id + rootId + '"}';
}
</script>

<script type="text/javascript">
    var itemArray, wxInfo, suin, onlyonline; 
    itemArray = {"0":{"ic":"13788","attr":"戒指手寸:颜色I主钻61.6女14号","bc":"1","mid":12707}};
    wxInfo = { isFocus: "true", wxId: "ONLY_BESTSELLER" };
    suin = "1814851631", onlyonline = "true";
    happyidea.product.cmdy.init();
</script>
</body></html>